package fm.yichenet.mongo.service;

import com.mongodb.DBObject;
import fm.entityEnum.CarouselScope;
import fm.entityEnum.CarouselType;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by CM on 17/5/22.
 */
public interface CarouselService {

    /**
     * 根据条件配置轮播图
     *
     * @param
     * @return
     */
    List<DBObject> getList(CarouselType type, CarouselScope scope, String city, String shopId, Date currentTime,Long sectionId) throws Exception;


    /**
     * 添加轮播图
     *
     * @param uri       图片完整URL
     * @param type      轮播图响应类型
     * @param scope     轮播图所在模块
     * @param typeValue 响应类型对应的值，：GOOD 对应商品ID LINK 对应文章链接
     */
    DBObject addCarousel(String uri, CarouselType type, CarouselScope scope, String typeValue, String city, String startTime, String endTime,Long section,String sectionName) throws Exception;


    /**
     * 删除轮播图
     *
     * @param cid
     */
    void delCarousel(String cid);

    /**
     * 获取对应页面配置的轮播图
     */
    List<DBObject> getCarouselByScope(String city,CarouselScope Scope) throws  Exception;

    /**
     * 商铺轮播图配置
     * @param url
     * @param type
     * @param typeValue
     * @param shopId
     * @return
     * @throws Exception
     */
    DBObject addShopCarousel(String url,CarouselType type,String typeValue,String shopId) throws  Exception;
    void delShopCarousel(String cid);
    List<DBObject> getShopCarouselList(CarouselType type,String shopId) throws Exception;
}
